package com.suliao.message.service;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

/**
 * @author ：M1nG
 * @date ：Created in 2021/1/5 11:34
 * @description：
 * @version: 1.0
 */
@Service
@Slf4j
@RocketMQMessageListener(topic = "test-topic-1", consumerGroup = "my-consumer_test-topic-1")
public class MyConsumer implements RocketMQListener<String> {
    public void onMessage(String message) {
        log.info("通过RocketMQMessageListener收到消息 received message: " + message);
    }
}
